Part Number Hot Search : 
LB1930MC HFMD1485 9F1S200S NTE15 XXXGX HCF4081 PF3500 BU9543KV
Product Description
Full Text Search
 

To Download MAX1231EVC16 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  general description the max1231 evaluation system (ev system) consists of a max1231 evaluation kit (ev kit) and a maxim 68hc16module-dip microcontroller (?) module. the max1231 is a 12-bit, 300ksps analog-to-digital converter (adc) with an internal temperature sensor, first-in/first- out (fifo), and an internal reference. the evaluation software runs under windows 95/98/2000, providing a handy user interface to exercise the max1231 features. order the complete ev system (MAX1231EVC16) for comprehensive evaluation of the max1231 using a per- sonal computer. order the ev kit (max1231evkit) if the 68hc16module module has already been pur- chased with a maxim ev system, or for custom use in other ?-based systems. this system can also evaluate the max1030, max1031, and max1230. contact the factory for free samples of these products. see the detailed description of hardware section. max1231 stand-alone ev kit the max1231 ev kit provides a proven pc board layout to facilitate evaluation of the max1231. it must be inter- faced to appropriate timing signals for proper opera- tion. connect 3v and ground return to terminal block tb1 (figure 5). refer to the max1227/max1229/ max1231 data sheet for timing requirements. max1231 ev system the max1231 ev system operates from a user-sup- plied 7vdc to 20vdc power supply. the evaluation software runs under windows 95/98/2000 on an ibm pc, interfacing to the ev system board through the computer? serial communications port. see the quick start section for setup and operating instructions. features proven pc board layout complete evaluation system convenient on-board test points data-logging software fully assembled and tested evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system ________________________________________________________________ maxim integrated products 1 19-2885; rev 0; 6/03 MAX1231EVC16 component list ordering information for pricing, delivery, and ordering information, please contact maxim/dallas direct! at 1-888-629-4642, or visit maxim? website at www.maxim-ic.com. windows is a registered trademark of microsoft corp. note: please indicate you are using the max1231 when contacting these component suppliers. part temp range interface type max1231evkit 0 c to +70 c user supplied MAX1231EVC16 0 c to +70 c windows software part qty description max1231evkit 1 max1231 evaluation kit 68hc16module-dip 1 68hc16 c module component suppliers supplier phone fax website tdk 847-803-6100 847-390-4405 www.component.tdk.com note: the max1231 evaluation software is designed for use with the complete evaluation system MAX1231EVC16 (includes the 68hc16module-dip module together with the max1231evkit). if the max1231 evaluation software is not to be used, the max1231evkit can be purchased by itself, with- out the ?.
quick start required equipment before you begin, you need the following equipment: MAX1231EVC16 (contains the max1231evkit and the 68hc16module-dip) dc power supply, +7vdc to +20vdc at 0.25a windows 95/98/2000 computer with a spare serial (com) port 9-pin i/o extension cable procedure do not turn on the power until all connections are made: 1) ensure that ju1 is in the 2-3 position (table 2). 2) carefully connect the boards by aligning the 40-pin header of the max1231 ev kit with the 40-pin con- nector of the 68hc16module-dip module. gently press them together. the two boards should be flush against one another. 3) connect a +7vdc to +20vdc power source to the c module at the terminal block located next to the on/off switch, along the top edge of the c module. observe the polarity marked on the board. 4) connect a cable from the computer s serial port to the c module. if using a 9-pin serial port, use a straight-through, 9-pin female-to-male cable. if the only available serial port uses a 25-pin connector, a standard 25-pin to 9-pin adapter is required. the ev kit software checks the modem status lines (cts, dsr, dcd) to confirm that the correct port has been selected. 5) install the evaluation software on your computer by running the install.exe program on the floppy disk. the program files are copied and icons are created for them in the windows start menu. 6) turn on the power supply. 7) start the max1231 program by opening its icon in the start menu. 8) the program prompts you to connect the c mod- ule and turn its power on. slide sw1 to the on posi- tion. select the correct serial port, and click ok. the program automatically downloads its software to the module. 9) apply an input signal to ain0 and click perform action . observe the readout on the screen. to per- form the action repeatedly, check the every 200ms box. 10) to view a graph of the measurements, pull down the view menu and click graph . detailed software description the evaluation software s main window configures the data converter and measures the analog inputs. under action , select a scanning sequence, repetitive conver- sions, or a single conversion. each selected channel s measurement results are displayed in the correspond- ing measurement results field. the action setting read single channel repeatedly requires making a selection under repetition to deter- mine how many times the selected channel should be measured. use averaging to summarize a series of measurement results on each selected channel as an arithmetic mean value. repetition can be used together with averaging to summarize a large number of measure- ment results as a small number of sample means. evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system 2 _______________________________________________________________________________________ max1231evkit component list designation qty description c1 c16 16 0.01f 10% ceramic capacitors (1206) c17 1 0.1f ceramic capacitor (1206) c18 1 10f 20%, 6.3v x5r ceramic capacitor (0805) tdk c2012x5r0j106m h1 1 7-pin header j1 1 2 x 20 right-angle socket ju1 2-3 1 shunt ju1 1 3-pin header ju2 0 shorted trace on pc board r1 r16 16 10 ? 5% resistors (1206) tb1 1 2-circuit terminal block, 5.08mm pitch tb2 tb5 4 5-circuit terminal blocks, 5.08mm pitch u1 1 max1231bceg-t (24-pin qsop) u2 1 m ax 1615e u k- t, abz d , ( 5- p i n s o t23) u3, u4 2 max1840eub (10-pin max) or max1841eub none 1 max1231 evaluation kit pc board note: bold items are software settings or commands.
evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system _______________________________________________________________________________________ 3 the low-level interface details panel shows the most recent low-level register write. a summary of what has been written to each register is available under the low-level registers tab. the ain14 and ain15 channels are automatically skipped if their alternate functions are selected in the setup register. the evaluation software updates its dis- play to show or hide these channels whenever the alternate functions are enabled or disabled. the setup tab configures the alternate functions for the ain14 and ain15 pins, and also configures adjacent channels as differential input pairs. the low-level registers tab summarizes the commands that create the active configuration. the reset all registers button resets these software-shadowed regis- ter values and sends the reset command to the max1231. table 1. graph tool buttons tool function show the entire available input range. expand the graph data to fill the window. move the view left or right. move the view up or down. expand or contract the x-axis. expand or contract the y-axis. load data from a file. save data to a file. option to write a header line when saving data. option to write line numbers when saving data. view code vs. time plot. view histogram plot (cumulative frequency of each code). view table. show minimum in tabular view. show maximum in tabular view. show span in tabular view. span = maximum - minimum show number of samples in tabular view. show sum of the samples in tabular view. show sum of the squares of the samples in tabular view. show arithmetic mean in tabular view: tool function show standard deviation in tabular view: show root of the mean of the squares (rms) in tabular view: channel 0 enable channel 1 enable channel 2 enable channel 3 enable channel 4 enable channel 5 enable channel 6 enable channel 7 enable channel 8 enable channel 9 enable channel 10 enable channel 11 enable channel 12 enable channel 13 enable channel 14 enable mean n = ? () s dard deviation n nn n n tan = () ? ? ? ? ? ? () 2 2 1 - - rms n = ? () 2
sampling measurement data can be sampled in external clock mode. from the setup tab, set clock mode to 0111xxxx ext clock . then, return to the measurement tab and click get samples . graph window to view recently measured data, drop down the view menu and choose graph . data can be viewed as a time sequence plot, a histogram plot, or as a table of raw numbers. see table 1 for available graph commands. diagnostics window the diagnostics window is used for factory testing prior to shipping the evaluation kit. it is not meant for cus- tomer use. detailed hardware description the max1231 device under test (u1) is a 12-bit, 300ksps adc with an internal temperature sensor, fifo, and an internal reference. resistors r1 r16 and capacitors c1 c16 form single-pole, lowpass, anti- aliasing filters for each input. capacitor c17 provides power-supply bypassing for u1 (figure 5). refer to the max1227/max1229/max1231 data sheet. the ev kit includes a max1615 3v/5v linear regulator (u2) and a set of max1840/max1841 level shifters (u3 and u4) to support using the 3v max1230 with the 5v c. evaluating the max1030 the max1030 is the 5v, 10-bit version of the max1231. to evaluate the max1030, request a free sample of max1030bceg. replace u1 with a max1030, and move ju1 shunt to the 5v position. in the software s options menu, select reference = 4.096v. the evaluation software expects 12 bits of data, but the max1030 only provides 10 bits of meaningful data. because the most significant bits are aligned, the mea- surement code numbers reported by the software are four times the actual measurement code number. reconstructed voltage values are unaffected. adjust the graph window by selecting its options menu; set its sub-lsb s to 2 . evaluating the max1031 the max1031 is the 10-bit version of the max1231. to evaluate the max1031, request a free sample of the max1031bceg. replace u1 with a max1031, and move the ju1 shunt to the 3v position. the evaluation software expects 12 bits of data, but the max1031 only provides 10 bits of meaningful data. because the most significant bits are aligned, the mea- surement code numbers reported by the software are four times the actual measurement code number. reconstructed voltage values are unaffected. adjust the graph window by selecting its options menu; set its sub-lsbs to 2 . evaluating the max1230 the max1230 is the 5v version of the max1231. to evaluate the max1230, request a free sample of the max1230bceg. replace u1 with a max1230, and move the shunt to the 5v position. in the software s options menu, select reference = 4.096v. using an external reference an external reference can be applied in single-ended or differential mode. in differential mode, analog input pin ain14 is used as the ref(-) return connection. in single- ended mode, the reference returns to common ground. with the power off, connect the external reference. then power up the system and run the evaluation software. under setup , select the appropriate reference input con- figuration. if using a single-ended reference, set reference input to 01xx01xx pin15 = ain14 . if using a differential reference, set reference input to 01xx11xx pin 15 = ref- . evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system 4 _______________________________________________________________________________________ table 2. jumper ju1 (v dd voltage selection) table 3. optional jumper ju2 (ain15 alternate function) * indicates default configuration. shunt position v dd (v) function 1 25v normal operation with u1 = max1230 or max1030. 2 3* 3v normal operation with u1 = max1231 or max1031. open unspecified d o not op erate ki t w i th ju 1 op en. * indicates default configuration. ju2 state u1 pin 16 connection function closed* (default trace on pc board) connected to c module j1 pin 29 (through level shifter) u1 pin 16 = cnvst conversion start command. leave tb5 pin 4 unconnected. open connected to tb5 pin 4 u1 pin 16 = ain15 analog input. connect signal source to terminal block tb5 pin 4.
evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system _______________________________________________________________________________________ 5 troubleshooting problem: no output measurement. system seems to report zero voltage or fails to make a measurement. solution: check v dd supply voltage. check the refer- ence voltage using a digital voltmeter. use an oscillo- scope to verify that the conversion-start signal is being strobed. problem: measurements are erratic, unstable, or have poor accuracy. solution: check the reference voltage using a digital voltmeter. use an oscilloscope to check for noise. when probing for noise, keep the oscilloscope ground return lead as short as possible, preferably less than 0.5in (10mm). problem: unacceptable errors occur when measuring a transducer. solution: although most signal sources can be con- nected directly to the max1231 s analog inputs, some high-impedance signal sources can require an input buffer. check for settling errors by increasing the acquisition time (internal clock mode 01). if necessary, use a max4430 to buffer high-impedance signal sources. figure 1. the max1231 evaluation software? main window configures the data converter and measures the analog inputs.
evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system 6 _______________________________________________________________________________________ figure 2. the main window? setup tab configures the alternate functions for ain14 and ain15, and also configures adjacent chan- nels as differential input pairs.
evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system _______________________________________________________________________________________ 7 figure 3. the main window? low-level registers tab summarizes the commands that create the active configuration.
evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system 8 _______________________________________________________________________________________ figure 4. the real-time data and sampled data graphs display data as a time sequence, histogram, or table.
evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system _______________________________________________________________________________________ 9 1 ain0 eoc 24 h1? eoc max1231 u1 terminal block r1 10 ? c1 0.01 f tb2? r16 10 ? r15 10 ? r14 10 ? r13 10 ? header terminal block tb5 h1 2 ain1 dout 23 h1? dout r2 10 ? c2 0.01 f tb2? tb2 tb3 tb4 3 ain2 din 22 h1? din r3 10 ? c3 0.01 f tb2? 4 ain3 cs 21 h1? cs r4 10 ? c4 0.01 f tb2? 5 ain4 sclk 20 h1? sclk r5 10 ? c5 0.01 f c17 0.1 f tb3? 6 ain5 vdd vdd 19 h1? r6 10 ? c6 0.01 f tb3? 7 ain6 gnd 18 h1? gnd vdd ref+ cnvst r7 10 ? c7 0.01 f tb3? 8 ain7 ref+ 17 r8 10 ? c8 0.01 f tb3? 9 ain8 cnvst/ain15 16 tb5? r9 10 ? c9 0.01 f tb4? 10 ain9 ref-/ain14 15 tb5? r10 10 ? c10 0.01 f tb4? 11 ain10 ain13 14 tb5? r11 10 ? c11 0.01 f tb4? 12 ain11 ain12 13 tb5? r12 10 ? c12 0.01 f tb4? tb2? tb3? terminal block tb4? terminal block tb5? c15 0.01 f c16 0.01 f c14 0.01 f c13 0.01 f figure 5a. max1231 ev kit schematic (sheet 1 of 2)
evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system 10 ______________________________________________________________________________________ 1 in shdn 5 max1615 u1 connector j1 j1 9 n.c. n.c. n.c. n.c. c18 10 f 6.3v 2 gnd 5/3 (fb) 4 1 ju1 2 3 cs vdd sclk din vdd eoc dout cnvst vdd j1 10 j1 11 j1 12 n.c. n.c. j1 13 j1 14 j1 5 j1 6 j1 1 j1 2 j1 3 j1 4 j1 15 n.c. n.c. n.c. n.c. j1 16 j1 17 j1 18 n.c. n.c. n.c. j1 19 j1 20 j1 21 n.c. j1 38 j1 7 j1 8 j1 37 j1 36 j1 22 j1 23 n.c. n.c. n.c. n.c. j1 24 j1 25 j1 26 n.c. n.c. n.c. j1 28 j1 30 j1 32 n.c. j1 33 n.c. j1 31 j1 35 j1 40 n.c. n.c. n.c. j1 39 j1 34 j1 27 n.c. j1 29 vdd 3 out 1 data max1840 u3 2 dvcc 3 cin 4 rin 5 shdn 10 i/o 9 vcc 8 clk 7 rst 6 gnd 6 gnd max1840 u4 7 rst 8 clk 9 vcc 10 i/o 5 shdn 4 rin 3 cin 2 dvcc 1 ju2 data +5v +5v +5v vdd +12v tb1 1 tb1 terminal block tb1 2 figure 5b. max1231 ev kit schematic (sheet 2 of 2)
evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system ______________________________________________________________________________________ 11 figure 6. max1231 ev kit component placement guide?omponent side figure 7. max1231 ev kit pc board layout?omponent side
evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system 12 ______________________________________________________________________________________ figure 8. max1231 ev kit pc board layout?older side
evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system ______________________________________________________________________________________ 13 listing 1 (sheet 1 of 4) // drv1231.h // max1231-specific driver. // (c) 2003 maxim integrated products //--------------------------------------------------------------------------- #ifndef drv1231h #define drv1231h //--------------------------------------------------------------------------- //-------------------------------------------------- // max1231 conversion register // 1 x x x x x x x #define max1231_conv 0x80 // // power-on state: 1000 0000 #define max1231_conv_por 0x80 // // channel selection #define max1231_conv_ain00 0x80 /* 10000xxx ain0 */ #define max1231_conv_ain01 0x88 /* 10001xxx ain1 */ #define max1231_conv_ain02 0x90 /* 10010xxx ain2 */ #define max1231_conv_ain03 0x98 /* 10011xxx ain3 */ #define max1231_conv_ain04 0xa0 /* 10100xxx ain4 */ #define max1231_conv_ain05 0xa8 /* 10101xxx ain5 */ #define max1231_conv_ain06 0xb0 /* 10110xxx ain6 */ #define max1231_conv_ain07 0xb8 /* 10111xxx ain7 */ #define max1231_conv_ain08 0xc0 /* 11000xxx ain8 */ #define max1231_conv_ain09 0xc8 /* 11001xxx ain9 */ #define max1231_conv_ain10 0xd0 /* 11010xxx ain10 */ #define max1231_conv_ain11 0xd8 /* 11011xxx ain11 */ #define max1231_conv_ain12 0xe0 /* 11100xxx ain12 */ #define max1231_conv_ain13 0xe8 /* 11101xxx ain13 */ #define max1231_conv_ain14 0xf0 /* 11110xxx ain14 */ #define max1231_conv_ain15 0xf8 /* 11111xxx ain15 */ // // actions #define max1231_conv_scan_00_n 0x80 /* 1xxxx000 scan 0,1,2,...n */ #define max1231_conv_scan_t_00_n 0x81 /* 1xxxx001 scan t,0,1,2,..n */ #define max1231_conv_scan_n_15 0x82 /* 1xxxx010 scan n,n+1,...,15 */ #define max1231_conv_scan_t_n_15 0x83 /* 1xxxx011 scan t,n,n+1,...,15 */ #define max1231_conv_single_repeat 0x84 /* 1xxxx10x read repeatedly */ #define max1231_conv_single_read 0x86 /* 1xxxx11x read once */ // #define max1231_action_mask 0x87 /* 1xxxx111 bits to test*/ //-------------------------------------------------- // max1231 setup register // 0 1 x x x x 0 0 // // setup register may optionally be followed by // one of the the differential configuration registers. // 01xxxx10 followed by a second byte, selecting unipolar-differential inputs // 01xxxx11 followed by a second byte, selecting bipolar-differential inputs #define max1231_setup 0x40 /* 01xxxx00 no additional bytes */ #define max1231_setup_unidiff 0x42 /* 01xxxx10 followed by another byte */ #define max1231_setup_bipdiff 0x43 /* 01xxxx11 followed by another byte */ // // power-on state: 0110 0000 #define max1231_setup_por 0x60 // // clock mode // 0100xxxx pin16=cnvst, int clock, triggered by cnvst pulse // 0101xxxx pin16=cnvst, int clock, triggered by cnvst pulses, custom tacq // 0110xxxx pin16=ain15, int clock, triggered by conversion register write // 0111xxxx pin16=ain15, ext clock, triggered by conversion register write #define max1231_setup_intclk_cnvst 0x40 /* 0100xxxx cnvst */
evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system 14 ______________________________________________________________________________________ #define max1231_setup_intclk_cnvst_tacq 0x50 /* 0101xxxx cnvst */ #define max1231_setup_intclk 0x60 /* 0110xxxx ain15 */ #define max1231_setup_extclk 0x70 /* 0111xxxx ain15 */ // // reference voltage // 01xx00xx pin15=ain14, internal reference, need wake-up delay // 01xx01xx pin15=ain14, external reference, single-ended // 01xx10xx pin15=ain14, internal reference, always on // 01xx11xx pin15=ref-, external reference, differential #define max1231_setup_intref_sleep 0x40 /* 01xx00xx ain14 */ #define max1231_setup_extref 0x44 /* 01xx01xx ain14 */ #define max1231_setup_intref_active 0x48 /* 01xx10xx ain14 */ #define max1231_setup_extref_diff 0x4c /* 01xx11xx ref(-) */ // // max1231 unipolar-differential input pairs // byte following max1231_setup_unidiff // 0 1 x x x x 1 0 unidiff // // power-on state: 0110 0010 0000 0000 #define max1231_setup_unidif_por 0x00 // #define max1231_setup_unidif0001 0x80 #define max1231_setup_unidif0203 0x40 #define max1231_setup_unidif0405 0x20 #define max1231_setup_unidif0607 0x10 #define max1231_setup_unidif0809 0x08 #define max1231_setup_unidif1011 0x04 #define max1231_setup_unidif1213 0x02 #define max1231_setup_unidif1415 0x01 // // max1231 bipolar-differential input pairs // byte following max1231_setup_bipdiff // 0 1 x x x x 1 1 bipdiff // // power-on state: 0110 0011 0000 0000 #define max1231_setup_bipdif_por 0x00 // #define max1231_setup_bipdif0001 0x80 #define max1231_setup_bipdif0203 0x40 #define max1231_setup_bipdif0405 0x20 #define max1231_setup_bipdif0607 0x10 #define max1231_setup_bipdif0809 0x08 #define max1231_setup_bipdif1011 0x04 #define max1231_setup_bipdif1213 0x02 #define max1231_setup_bipdif1415 0x01 //-------------------------------------------------- // max1231 averaging register // 0 0 1 x x x x x // // power-on state: 0010 0000 #define max1231_average_por 0x20 // // averaging // 001000xx one measurement result (no averaging) // 001100xx mean of 4 measurement results // 001101xx mean of 8 measurement results // 001110xx mean of 16 measurement results // 001111xx mean of 32 measurement results #define max1231_average_1 0x20 /* 001000xx no averaging */ #define max1231_average_4 0x30 /* 001100xx mean of 4 measurements */ #define max1231_average_8 0x34 /* 001101xx mean of 8 measurements */ #define max1231_average_16 0x38 /* 001110xx mean of 16 measurements */ #define max1231_average_32 0x3c /* 001111xx mean of 32 measurements */ listing 1 (sheet 2 of 4)
evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system ______________________________________________________________________________________ 15 // // repeat count // enabled by max1231_conv_single_repeat 1xxxx10x // internal clock modes only #define max1231_repeat_4 0x20 /* 001xxx00 4 times */ #define max1231_repeat_8 0x21 /* 001xxx01 8 times */ #define max1231_repeat_12 0x22 /* 001xxx10 12 times */ #define max1231_repeat_16 0x23 /* 001xxx11 16 times */ //-------------------------------------------------- // max1231 reset register (reset command) // 0 0 0 1 x x x x // // reset only the fifo entries #define max1231_reset_fifo 0x18 /* 00011xxx reset fifo data registers */ // // reset all registers to their power-on default states #define max1231_reset_all 0x10 /* 00010xxx reset all registers */ //-------------------------------------------------- // enumerated type defining the meaning of each of the // max1231's fifo data slots. typedef enum { // // unused fifo slot; meaningless data. undefined = 0 , // // temperature measurement. // the scan modes always place temperature data // at the head of the fifo. temperature , // // single-ended unipolar analog inputs. // code 0x0000 = minimum voltage // code 0x0fff = maximum voltage // note that ain14 and ain15 pins have optional alternate functions. uniain00 , uniain01 , uniain02 , uniain03 , uniain04 , uniain05 , uniain06 , uniain07 , uniain08 , uniain09 , uniain10 , uniain11 , uniain12 , uniain13 , uniain14 , uniain15 , // // unipolar differential input pairs. // code 0x0000 = minimum voltage // code 0x0fff = maximum voltage unidif0001 , unidif0203 , unidif0405 , unidif0607 , unidif0809 , unidif1011 , unidif1213 , unidif1415 , // // bipolar differential input pairs. // code 0x07ff = maximum voltage // code 0x0000 = zero volts // code 0x0800 = minimum voltage bipdif0001 , bipdif0203 , bipdif0405 , bipdif0607 , bipdif0809 , bipdif1011 , bipdif1213 , bipdif1415 , // num_fifo_entry_types } max1231_fifo_entry_t ; //-------------------------------------------------- // enumerated type defining each pair of max1231 inputs // as single-ended or differential typedef enum { single_ended = 0 , unipolar_differential , listing 1 (sheet 3 of 4)
evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system 16 ______________________________________________________________________________________ bipolar_differential } max1231_channel_config_t ; //-------------------------------------------------- // c++ class representing the state of a max1231 class max1231 { public: // max1231 registers cannot be read, // so keep track of the register values here. int conversion_register ; int new_conversion_register ; int setup_register ; int setup_unidiff_register ; int setup_bipdiff_register ; int averaging_register ; // the reference voltage is used to calculate the input voltage // represented by each measurement. double vref ; // constructor for class max1231. max1231 (void); // input configuration // array inputpairconfig[] determines whether each pair // of input channels is configured as two single-ended inputs, // a unipolar differential pair, or a bipolar differential pair. max1231_channel_config_t inputpairconfig [ 8 ]; // // member function to figure out the values of inputpairconfig // based on the max1231 register values. // call this function afer setting setup_unidiff_register and setup_bipdiff_register // before using the values of inputpairconfig[]. void update_inputpairconfig (void); // the max1231 has a fifo data buffer with // 16 entries (plus an optional temperature measurement). // array fifo_meaning[] determines what to do with // each successive word read from the max1231. max1231_fifo_entry_t fifo_meaning [ 17 ]; // // member function to figure out the values of fifo_meaning // based on the max1231 register values. // call this function afer setting conversion_register, setup_register, and averaging_register // before using the values of fifo_meaning[]. void update_fifo_meaning (void); int channel ( max1231_fifo_entry_t meaning ) { if (( uniain00 <= meaning ) && ( meaning <= uniain15 )) { return ( meaning - uniain00 ); } else if (( unidif0001 <= meaning ) && ( meaning <= unidif1415 )) { return ( meaning - unidif0001 ) * 2 ; } else if (( bipdif0001 <= meaning ) && ( meaning <= bipdif1415 )) { return ( meaning - bipdif0001 ) * 2 ; } else if ( meaning == temperature ) { return 16 ; } else { return 0 ; } };}; //--------------------------------------------------------------------------- #endif // drv1231h listing 1 (sheet 4 of 4)
evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system ______________________________________________________________________________________ 17 listing 2 (sheet 1 of 4) // drv1231.cpp // max1231-specific driver. // (c) 2003 maxim integrated products //--------------------------------------------------------------------------- #include "drv1231.h" //--------------------------------------------------------------------------- max1231 :: max1231 (void) { conversion_register = max1231_conv_por ; setup_register = max1231_setup_por ; setup_unidiff_register = max1231_setup_unidif_por ; setup_bipdiff_register = max1231_setup_bipdif_por ; averaging_register = max1231_average_por ; vref = 2.500 ; for (int index = 0 ; index < 8 ; index ++) { inputpairconfig [ index ] = single_ended ; } for (int index = 0 ; index < 17 ; index ++) { fifo_meaning [ index ] = undefined ; } } //--------------------------------------------------------------------------- void max1231 :: update_inputpairconfig (void) { for (int index = 0 ; index < 8 ; index ++) { inputpairconfig [ index ] = single_ended ; } if ( setup_bipdiff_register & max1231_setup_bipdif0001 ) inputpairconfig [ 0 ] = bipolar_differential ; if ( setup_bipdiff_register & max1231_setup_bipdif0203 ) inputpairconfig [ 1 ] = bipolar_differential ; if ( setup_bipdiff_register & max1231_setup_bipdif0405 ) inputpairconfig [ 2 ] = bipolar_differential ; if ( setup_bipdiff_register & max1231_setup_bipdif0607 ) inputpairconfig [ 3 ] = bipolar_differential ; if ( setup_bipdiff_register & max1231_setup_bipdif0809 ) inputpairconfig [ 4 ] = bipolar_differential ; if ( setup_bipdiff_register & max1231_setup_bipdif1011 ) inputpairconfig [ 5 ] = bipolar_differential ; if ( setup_bipdiff_register & max1231_setup_bipdif1213 ) inputpairconfig [ 6 ] = bipolar_differential ; if ( setup_bipdiff_register & max1231_setup_bipdif1415 ) inputpairconfig [ 7 ] = bipolar_differential ; if ( setup_unidiff_register & max1231_setup_unidif0001 ) inputpairconfig [ 0 ] = unipolar_differential ; if ( setup_unidiff_register & max1231_setup_unidif0203 ) inputpairconfig [ 1 ] = unipolar_differential ; if ( setup_unidiff_register & max1231_setup_unidif0405 ) inputpairconfig [ 2 ] = unipolar_differential ; if ( setup_unidiff_register & max1231_setup_unidif0607 ) inputpairconfig [ 3 ] = unipolar_differential ; if ( setup_unidiff_register & max1231_setup_unidif0809 ) inputpairconfig [ 4 ] = unipolar_differential ; if ( setup_unidiff_register & max1231_setup_unidif1011 ) inputpairconfig [ 5 ] = unipolar_differential ; if ( setup_unidiff_register & max1231_setup_unidif1213 ) inputpairconfig [ 6 ] = unipolar_differential ; if ( setup_unidiff_register & max1231_setup_unidif1415 ) inputpairconfig [ 7 ] = unipolar_differential ; } //--------------------------------------------------------------------------- void max1231 :: update_fifo_meaning (void) { int conversion_register = new_conversion_register ;
evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system 18 ______________________________________________________________________________________ for (int index = 0 ; index < 17 ; index ++) { fifo_meaning [ index ] = undefined ; } int channel_field = ( conversion_register >> 3 ) & 0x0f ; int channel_index = channel_field ; int repeat_count = 4 ; switch( averaging_register & 0xe3 ) { case max1231_repeat_4 : // 001xxx00 4 times repeat_count = 4 ; break; case max1231_repeat_8 : // 001xxx01 8 times repeat_count = 8 ; break; case max1231_repeat_12 : // 001xxx10 12 times repeat_count = 12 ; break; case max1231_repeat_16 : // 001xxx11 16 times repeat_count = 16 ; break; } max1231_fifo_entry_t meaning = ( max1231_fifo_entry_t )( uniain00 + channel_field ); if ( inputpairconfig [ channel_field / 2 ] == bipolar_differential ) { meaning = ( max1231_fifo_entry_t )( bipdif0001 + channel_field / 2 ); } else if ( inputpairconfig [ channel_field / 2 ] == unipolar_differential ) { meaning = ( max1231_fifo_entry_t )( unidif0001 + channel_field / 2 ); } int index = 0 ; switch( conversion_register & max1231_action_mask ) { case max1231_conv_scan_00_n : meaning = uniain00 ; channel_index = 0 ; while( channel_index <= channel_field ) { int pair_index = channel_index / 2 ; if ( inputpairconfig [ pair_index ] == bipolar_differential ) { meaning = ( max1231_fifo_entry_t )( bipdif0001 + pair_index ); fifo_meaning [ index ++] = meaning ; channel_index = channel_index + 2 ; } else if ( inputpairconfig [ pair_index ] == unipolar_differential ) { meaning = ( max1231_fifo_entry_t )( unidif0001 + pair_index ); fifo_meaning [ index ++] = meaning ; channel_index = channel_index + 2 ; } else { meaning = ( max1231_fifo_entry_t )( uniain00 + channel_index ); fifo_meaning [ index ++] = meaning ; channel_index = channel_index + 1 ; } } break; case max1231_conv_scan_t_00_n : fifo_meaning [ index ++] = temperature ; meaning = uniain00 ; channel_index = 0 ; while( channel_index <= channel_field ) { int pair_index = channel_index / 2 ; if ( inputpairconfig [ pair_index ] == bipolar_differential ) { meaning = ( max1231_fifo_entry_t )( bipdif0001 + pair_index ); fifo_meaning [ index ++] = meaning ; channel_index = channel_index + 2 ; } else if ( inputpairconfig [ pair_index ] == unipolar_differential ) { meaning = ( max1231_fifo_entry_t )( unidif0001 + pair_index ); fifo_meaning [ index ++] = meaning ; channel_index = channel_index + 2 ; } else { meaning = ( max1231_fifo_entry_t )( uniain00 + channel_index ); fifo_meaning [ index ++] = meaning ; channel_index = channel_index + 1 ; } } listing 2 (sheet 2 of 4)
evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system ______________________________________________________________________________________ 19 break; case max1231_conv_scan_n_15 : while ( index < 17 ) { int pair_index = channel_index / 2 ; if ( inputpairconfig [ pair_index ] == bipolar_differential ) { meaning = ( max1231_fifo_entry_t )( bipdif0001 + pair_index ); fifo_meaning [ index ++] = meaning ; channel_index = channel_index + 2 ; } else if ( inputpairconfig [ pair_index ] == unipolar_differential ) { meaning = ( max1231_fifo_entry_t )( unidif0001 + pair_index ); fifo_meaning [ index ++] = meaning ; channel_index = channel_index + 2 ; } else { meaning = ( max1231_fifo_entry_t )( uniain00 + channel_index ); fifo_meaning [ index ++] = meaning ; channel_index = channel_index + 1 ; } if ( meaning == uniain15 ) break; if ( meaning == unidif1415 ) break; if ( meaning == bipdif1415 ) break; } break; case max1231_conv_scan_t_n_15 : fifo_meaning [ index ++] = temperature ; while ( index < 17 ) { int pair_index = channel_index / 2 ; if ( inputpairconfig [ pair_index ] == bipolar_differential ) { meaning = ( max1231_fifo_entry_t )( bipdif0001 + pair_index ); fifo_meaning [ index ++] = meaning ; channel_index = channel_index + 2 ; } else if ( inputpairconfig [ pair_index ] == unipolar_differential ) { meaning = ( max1231_fifo_entry_t )( unidif0001 + pair_index ); fifo_meaning [ index ++] = meaning ; channel_index = channel_index + 2 ; } else { meaning = ( max1231_fifo_entry_t )( uniain00 + channel_index ); fifo_meaning [ index ++] = meaning ; channel_index = channel_index + 1 ; } if ( meaning == uniain15 ) break; if ( meaning == unidif1415 ) break; if ( meaning == bipdif1415 ) break; } break; case max1231_conv_single_repeat : while ( index < repeat_count ) { fifo_meaning [ index ++] = meaning ; } break; case max1231_conv_single_read : fifo_meaning [ index ++] = meaning ; break; } /* check for setups where ain14-ain15 are used for an alternate function */ if (( setup_register & 0xe0 ) == max1231_setup_intclk_cnvst ) { /* 0100xxxx ain15 alternate function as cnvst input */ /* 0101xxxx ain15 alternate function as cnvst input */ for (int index = 0 ; index < 17 ; index ++) { meaning = fifo_meaning [ index ]; if ( meaning == uniain15 ) fifo_meaning [ index ] = undefined ; if ( meaning == unidif1415 ) fifo_meaning [ index ] = undefined ; if ( meaning == bipdif1415 ) fifo_meaning [ index ] = undefined ; } } if (( setup_register & 0xcc ) == max1231_setup_extref_diff ) { /* 01xx11xx ain14 alternate function as ref- input */ for (int index = 0 ; index < 17 ; index ++) { listing 2 (sheet 3 of 4)
maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a maxim product. no circu it patent licenses are implied. maxim reserves the right to change the circuitry and specifications without notice at any time. 20 ____________________maxim integrated products, 120 san gabriel drive, sunnyvale, ca 94086 408-737-7600 ? 2003 maxim integrated products printed usa is a registered trademark of maxim integrated products. evaluates: max1030/max1031/max1230/max1231 max1231 evaluation kit/ max1231 evaluation system meaning = fifo_meaning [ index ]; if ( meaning == uniain14 ) fifo_meaning [ index ] = undefined ; if ( meaning == unidif1415 ) fifo_meaning [ index ] = undefined ; if ( meaning == bipdif1415 ) fifo_meaning [ index ] = undefined ; } } } //--------------------------------------------------------------------------- listing 2 (sheet 4 of 4)


▲Up To Search▲   

 
Price & Availability of MAX1231EVC16

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X